Skip to content

MPT-19004 Documentation update#254

Open
albertsola wants to merge 1 commit intomainfrom
MPT-19004/copilot-instructions-and-docs
Open

MPT-19004 Documentation update#254
albertsola wants to merge 1 commit intomainfrom
MPT-19004/copilot-instructions-and-docs

Conversation

@albertsola
Copy link
Copy Markdown
Contributor

@albertsola albertsola commented Mar 27, 2026

Update documentation and AGENTS.md following practices documented: https://softwareone.atlassian.net/wiki/spaces/~712020b14b6af3a5e341f9b4c936ce4cd948bb/pages/7130022026/Extensions+technical+documentation+Strategy+for+Repositories

Closes MPT-19004

  • Add repository Copilot guidance: .github/copilot-instructions.md (repo identity, pointer to AGENTS.md, quick validation: make check && make test)
  • Add AGENTS.md as repository documentation index (library purpose, reading order, key commands, project layout, link to upstream OpenAPI spec, engineering standards)
  • Revise README.md to explicitly describe the SoftwareONE Marketplace Platform client, provide a condensed Quick Start, minimal usage example, key commands, and documentation links
  • Add comprehensive docs:
    • docs/architecture.md — client architecture, package layout, transport/services/models/RQL, and error handling
    • docs/contributing.md — contribution workflow, Python style rules, tooling (lint/format/type), dependency commands, and resource addition checklist
    • docs/local-development.md — local setup, Docker-based dev workflow, Makefile targets, and environment variables
    • docs/testing.md — test strategy (unit/e2e), pytest/tooling stack, AAA conventions, E2E requirements, coverage and Sonar reporting
  • Documentation-only changes; no code or public API modifications

@albertsola albertsola requested a review from a team as a code owner March 27, 2026 14:59
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 27, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Adds repository-level documentation: a Copilot instructions file, an AI assistant entry, an updated README with a condensed quick-start and usage snippet, and four new docs covering architecture, contributing, local development, and testing.

Changes

Cohort / File(s) Summary
Repository Guidance
/.github/copilot-instructions.md, AGENTS.md, README.md
Adds Copilot instructions and an AI-assistant entry; replaces README content with a concise quick-start, usage example, trimmed docs index, and shortened key commands.
Developer Documentation
docs/architecture.md, docs/contributing.md, docs/local-development.md, docs/testing.md
Adds four new docs describing the client architecture (4-layer model), contribution workflow and tooling, Docker/Make local development workflow, and testing strategy/layout/tooling.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Jira Issue Key In Title ✅ Passed The PR title contains the Jira issue key MPT-19004 in the required format at the beginning.
Test Coverage Required ✅ Passed The PR modifies 151 code files in mpt_api_client/ and includes 407 test files in tests/ (unit and e2e tests), satisfying the requirement that test files be included when code is modified.
Single Commit Required ✅ Passed The pull request contains exactly one commit (39cac6e - 'MPT-19004 Documentation update') consolidating all documentation updates.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Comment @coderabbitai help to get the list of available commands and usage tips.

@albertsola albertsola requested review from d3rky and robcsegal March 27, 2026 15:00
Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@docs/architecture.md`:
- Around line 94-103: The Python snippet in the docs causes ruff format --check
to fail due to uneven spacing in the inline comments; edit the code block
containing MPTClient.from_config and normalize spacing so each attribute access
line (e.g., client.catalog, client.commerce, client.billing, client.accounts,
client.audit, client.helpdesk, client.notifications) uses a single space before
the inline comment (e.g., "client.catalog  # → Catalog") to satisfy the
formatter and CI.
- Around line 20-69: The markdown fences that list the project tree, the ASCII
diagram box, and the error hierarchy (the blocks beginning with
"mpt_api_client/", the box diagram, and the block starting with "MPTError") are
missing language identifiers and trigger MD040; update each opening
triple-backtick to include a language tag (use "text") for those fenced code
blocks and apply the same change to the other affected blocks referenced around
lines 75-85 and 190-194 so all fenced code blocks specify a language.

In `@docs/testing.md`:
- Around line 72-88: The test snippet fails ruff format due to missing/incorrect
blank-line spacing; update the snippet around the top-level imports (pytest,
respx, Response) and the test function test_get_product so there is a single
blank line separating the import block from the function definition and remove
any stray characters (like the displayed "+"); ensure overall file-level
blank-line conventions are respected so ruff format --check passes while keeping
the existing imports and the test_get_product function name unchanged.
- Around line 8-29: The fenced code block showing the tests/ directory tree is
missing a language tag which triggers markdownlint MD040; update the block in
docs/testing.md to include a language specifier (e.g., add "text" after the
opening ``` so the block becomes ```text) for the tests/ tree snippet to satisfy
the linter and preserve formatting.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro

Run ID: 4570fb7e-977b-43f9-818a-e510a5f9756b

📥 Commits

Reviewing files that changed from the base of the PR and between 9ef1497 and d685e59.

📒 Files selected for processing (7)
  • .github/copilot-instructions.md
  • AGENTS.md
  • README.md
  • docs/architecture.md
  • docs/contributing.md
  • docs/local-development.md
  • docs/testing.md

@albertsola albertsola force-pushed the MPT-19004/copilot-instructions-and-docs branch 3 times, most recently from c773b4e to f6ebf60 Compare March 30, 2026 10:35
Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

♻️ Duplicate comments (2)
docs/architecture.md (2)

190-194: ⚠️ Potential issue | 🟡 Minor

Add a language identifier to this fenced code block (text).

This fence is still unlabeled and triggers MD040.

Suggested fix
-```
+```text
 MPTError
 ├── MPTHttpError          # generic HTTP error (status_code, message, body)
 │   └── MPTAPIError       # structured API error (payload, title, detail, trace_id)
</details>

As per coding guidelines, "For each subsequent commit in this PR, explicitly verify if previous review comments have been resolved".

<details>
<summary>🤖 Prompt for AI Agents</summary>

Verify each finding against the current code and only fix it if needed.

In @docs/architecture.md around lines 190 - 194, The fenced code block showing
the error hierarchy (lines with "MPTError", "MPTHttpError", "MPTAPIError") is
unlabeled and triggers MD040; update that fence to include the language
identifier "text" so the block becomes a labeled code fence (i.e., add text
after the opening backticks) to satisfy the linter and keep the displayed ASCII
diagram intact.


</details>

---

`94-103`: _⚠️ Potential issue_ | _🟠 Major_

**Normalize inline comment spacing in the Python snippet to pass `ruff format --check`.**

This is still failing CI: the snippet uses uneven spacing before inline comments.
 
<details>
<summary>Suggested fix</summary>

```diff
 ```python
 client = MPTClient.from_config(api_token="...", base_url="...")
-client.catalog      # → Catalog
-client.commerce     # → Commerce
-client.billing      # → Billing
-client.accounts     # → Accounts
-client.audit        # → Audit
-client.helpdesk     # → Helpdesk
+client.catalog  # → Catalog
+client.commerce  # → Commerce
+client.billing  # → Billing
+client.accounts  # → Accounts
+client.audit  # → Audit
+client.helpdesk  # → Helpdesk
 client.notifications  # → Notifications
</details>

As per coding guidelines, "For each subsequent commit in this PR, explicitly verify if previous review comments have been resolved".

<details>
<summary>🤖 Prompt for AI Agents</summary>

Verify each finding against the current code and only fix it if needed.

In @docs/architecture.md around lines 94 - 103, The inline comment spacing in
the Python snippet is inconsistent; normalize the spacing so each attribute
access (e.g., MPTClient.from_config and the subsequent client.catalog,
client.commerce, client.billing, client.accounts, client.audit, client.helpdesk,
client.notifications lines) uses the same number of spaces before the "# →"
comment (make them consistent as shown in the suggested fix) so the snippet
passes ruff format --check; update all those client.* lines to use identical
spacing for their inline comments.


</details>

</blockquote></details>

</blockquote></details>

<details>
<summary>🤖 Prompt for all review comments with AI agents</summary>

Verify each finding against the current code and only fix it if needed.

Duplicate comments:
In @docs/architecture.md:

  • Around line 190-194: The fenced code block showing the error hierarchy (lines
    with "MPTError", "MPTHttpError", "MPTAPIError") is unlabeled and triggers MD040;
    update that fence to include the language identifier "text" so the block becomes
    a labeled code fence (i.e., add text after the opening backticks) to satisfy
    the linter and keep the displayed ASCII diagram intact.
  • Around line 94-103: The inline comment spacing in the Python snippet is
    inconsistent; normalize the spacing so each attribute access (e.g.,
    MPTClient.from_config and the subsequent client.catalog, client.commerce,
    client.billing, client.accounts, client.audit, client.helpdesk,
    client.notifications lines) uses the same number of spaces before the "# →"
    comment (make them consistent as shown in the suggested fix) so the snippet
    passes ruff format --check; update all those client.* lines to use identical
    spacing for their inline comments.

</details>

---

<details>
<summary>ℹ️ Review info</summary>

<details>
<summary>⚙️ Run configuration</summary>

**Configuration used**: Repository YAML (base), Organization UI (inherited)

**Review profile**: CHILL

**Plan**: Pro

**Run ID**: `2955947f-ef14-4e98-8007-a6a805ad8e3e`

</details>

<details>
<summary>📥 Commits</summary>

Reviewing files that changed from the base of the PR and between c773b4eebe0ea88b746f26f696f3254ac893e323 and f6ebf60f84a3020f6709051a9abc50103cbdcd3c.

</details>

<details>
<summary>📒 Files selected for processing (7)</summary>

* `.github/copilot-instructions.md`
* `AGENTS.md`
* `README.md`
* `docs/architecture.md`
* `docs/contributing.md`
* `docs/local-development.md`
* `docs/testing.md`

</details>

<details>
<summary>✅ Files skipped from review due to trivial changes (6)</summary>

* .github/copilot-instructions.md
* docs/local-development.md
* AGENTS.md
* docs/contributing.md
* README.md
* docs/testing.md

</details>

</details>

<!-- This is an auto-generated comment by CodeRabbit for review status -->

@albertsola albertsola force-pushed the MPT-19004/copilot-instructions-and-docs branch from f6ebf60 to 351a216 Compare March 30, 2026 10:43
Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@docs/architecture.md`:
- Around line 190-194: The fenced code block showing the error hierarchy is
missing a language identifier; update the markdown block that contains
"MPTError", "MPTHttpError", and "MPTAPIError" to include a language identifier
(e.g., add ```text before the block) so markdownlint MD040 is satisfied and the
diagram renders correctly. Locate the block that lists MPTError → MPTHttpError →
MPTAPIError and prepend the fence with the chosen language identifier; leave the
block contents unchanged.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro

Run ID: d9332f3c-0186-443e-9175-edcbcd804623

📥 Commits

Reviewing files that changed from the base of the PR and between f6ebf60 and 351a216.

📒 Files selected for processing (7)
  • .github/copilot-instructions.md
  • AGENTS.md
  • README.md
  • docs/architecture.md
  • docs/contributing.md
  • docs/local-development.md
  • docs/testing.md
✅ Files skipped from review due to trivial changes (6)
  • .github/copilot-instructions.md
  • AGENTS.md
  • README.md
  • docs/local-development.md
  • docs/testing.md
  • docs/contributing.md

@albertsola albertsola force-pushed the MPT-19004/copilot-instructions-and-docs branch from 351a216 to 64aade2 Compare March 30, 2026 10:51
@albertsola albertsola force-pushed the MPT-19004/copilot-instructions-and-docs branch from 64aade2 to 39cac6e Compare March 30, 2026 10:52
@sonarqubecloud
Copy link
Copy Markdown

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
README.md (1)

14-20: Consider adding brief guidance on obtaining credentials.

The Quick Start instructs users to configure MPT_API_BASE_URL and MPT_API_TOKEN but doesn't explain where to obtain these values. While the full Installation & Usage Guide (line 24) likely covers this, adding a one-line hint here (e.g., "obtain from your MPT account settings" or "contact your administrator") would improve the quick-start experience.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@README.md` around lines 14 - 20, Update the Quick Start block to add a
one-line hint about where to get the required credentials: mention that
MPT_API_BASE_URL and MPT_API_TOKEN can be obtained from the user's MPT account
settings or by contacting their administrator, and suggest adding that hint
immediately after the cp .env.sample .env line in the Quick Start section so
users know where to source MPT_API_BASE_URL and MPT_API_TOKEN.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@README.md`:
- Around line 14-20: Update the Quick Start block to add a one-line hint about
where to get the required credentials: mention that MPT_API_BASE_URL and
MPT_API_TOKEN can be obtained from the user's MPT account settings or by
contacting their administrator, and suggest adding that hint immediately after
the cp .env.sample .env line in the Quick Start section so users know where to
source MPT_API_BASE_URL and MPT_API_TOKEN.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro

Run ID: 949b67d1-3f97-41f2-bc19-e2d6b8955a76

📥 Commits

Reviewing files that changed from the base of the PR and between 351a216 and 39cac6e.

📒 Files selected for processing (7)
  • .github/copilot-instructions.md
  • AGENTS.md
  • README.md
  • docs/architecture.md
  • docs/contributing.md
  • docs/local-development.md
  • docs/testing.md
✅ Files skipped from review due to trivial changes (6)
  • .github/copilot-instructions.md
  • AGENTS.md
  • docs/architecture.md
  • docs/local-development.md
  • docs/contributing.md
  • docs/testing.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant